//
//----------------------------------------------
// Original project: 
// by  Stewart Lynch on 2024-12-24
//
// Follow me on Mastodon: @StewartLynch@iosdev.space
// Follow me on Threads: @StewartLynch (https://www.threads.net)
// Follow me on X: https://x.com/StewartLynch
// Follow me on LinkedIn: https://linkedin.com/in/StewartLynch
// Subscribe on YouTube: https://youTube.com/@StewartLynch
// Buy me a ko-fi:  https://ko-fi.com/StewartLynch
//----------------------------------------------
// Copyright © 2024 CreaTECH Solutions. All rights reserved.



public struct Joke: Codable, Sendable {
    public let id: Int
    public let category: Category
    public let type: JokeType
    public let lang: Language
    public let setup: String?
    public let delivery: String?
    public let joke: String?
}

public enum Category: String, Codable, CaseIterable, Identifiable, Sendable {
    case `Any`, Programming, Misc, Dark, Pun, Spooky, Christmas
    public var id: Self { self }
}

public enum Language: String, Codable, CaseIterable, Identifiable, Sendable {
    case en, fr, cs, de, es, pt
    public var id: Self { self }
}

public enum JokeType: String, Codable, Sendable {
    case twopart, single
}
